
        <div class="span6">
          <div class="control-group <%= "error" if @printer.errors[:name].length > 0 %>">
            <label class="control-label " for="name">打印机名称</label>
            <div class="controls">
              <%= f.text_field :name,class:"grd-white",label:false,placeholder:"请输入名称"%>
              <% if @printer.errors[:name].length > 0  %>
                  <span class="help-inline"> <%= @printer.errors[:name].join(',') %></span>
              <% end %>
            </div>
          </div>

          <div class="control-group <%= "error" if @printer.errors[:name].length > 0 %>">
            <label class="control-label " for="name">打印机编号</label>
            <div class="controls">
              <%= f.text_field :sn,class:"grd-white",label:false,placeholder:"请输入编号"%>
              <% if @printer.errors[:name].length > 0  %>
                  <span class="help-inline"> <%= @printer.errors[:name].join(',') %></span>
              <% end %>
            </div>
          </div>
        </div>

        <div class="span6">
          <div class="control-group <%= "error" if @printer.errors[:name].length > 0 %>">
            <label class="control-label " for="name">打印机KEY</label>
            <div class="controls">
              <%= f.text_field :key,class:"grd-white",label:false,placeholder:"请输入编号"%>
              <% if @printer.errors[:name].length > 0  %>
                  <span class="help-inline"> <%= @printer.errors[:name].join(',') %></span>
              <% end %>
            </div>
          </div>
        </div>

         <div class="span12">
              <%= f.submit '添加',class:"btn btn-large btn-primary" %>
              <%= link_to "取消","/admin/restaurants/#{@restaurant.id}/printers",class:"btn btn-large btn-default" %>
            </div>
